package cn.bocweb.spinning.view.dialog;

import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import cn.bocweb.spinning.R;

/**
 * Created by chenchangxing on 15/12/23.
 */
public class SignDialog extends AlertDialog {
    Context context;
    String sign;
    public SignDialog(Context context) {
        super(context);
        this.context = context;
    }

    public SignDialog(Context context, int themeResId) {
        super(context, themeResId);
        this.context = context;
    }

    public void setSignCount(String sign) {
        this.sign = sign;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_sign);
        Button btnSubmit = (Button)findViewById(R.id.btn_submit);
        TextView signCount = (TextView)findViewById(R.id.sign_count);
        signCount.setText(sign);
        btnSubmit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });

    }
}
